<?php 
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/
defined('_JEXEC') or die('Retricted Access');
$statistics = $this->statistics;
global $option;
?>
<form name="adminForm" action="index.php" method="post" enctype="multipart/form-data">
  <?php echo $this->menu();?>
  
  <div id="ja-filter">
		<?php echo JText::_( 'Filter' ); ?>:
		<input type="text" name="search" id="search" value="" class="text_area" />
		<?php echo $this->searchOption; ?>
		<button onclick="this.form.submit();"><?php echo JText::_( 'GO' ); ?></button>
	</div>
	
	<div class="clearfix">
		<!-- POSTED JOBS -->
			<div class="ja-posted-jobs">
				<fieldset>
				<legend><?php echo JText::_('Posted Jobs');?></legend>
					<table class="adminlist">
			    	<thead>
  						<tr>
								<th class="sectiontableheader" width="20%"><?php echo JText::_(' '); ?></th>
			    			<th class="sectiontableheader"><?php echo JText::_('Approved'); ?></th>
			    			<th class="sectiontableheader"><?php echo JText::_('Disapproved'); ?></th>
			    			<th class="sectiontableheader"><?php echo JText::_('Waiting'); ?></th>
			    			<th class="sectiontableheader"><?php echo JText::_('Expired'); ?></th>
			    			<th class="sectiontableheader"><?php echo JText::_('Total'); ?></th>
			    		</tr>
  					</thead>
					<tr class="row0">
						<td><?php echo JText::_('Today'); ?></td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=approved&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_jobs']['approved']['today']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=nonapproved&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_jobs']['nonapproved']['today']; ?>
							</a>
						</td>	
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=waiting&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_jobs']['waiting']['today']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=expired&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_jobs']['expired']['today']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_jobs']['expired']['today'] + $statistics['ja_jobs']['approved']['today']+$statistics['ja_jobs']['nonapproved']['today']+$statistics['ja_jobs']['waiting']['today']; ?>
							</a>
						</td>
					</tr>
					<tr class="row1">
						<td><?php echo JText::_('This week'); ?></td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=approved&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_jobs']['approved']['week']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=nonapproved&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_jobs']['nonapproved']['week']; ?>
							</a>
						</td>	
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=waiting&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_jobs']['waiting']['week']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=expired&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_jobs']['expired']['week']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_jobs']['expired']['week'] + $statistics['ja_jobs']['approved']['week']+$statistics['ja_jobs']['nonapproved']['week']+$statistics['ja_jobs']['waiting']['week']; ?>
							</a>
						</td>
					</tr>
					<tr class="row0">
						<td><?php echo JText::_('This month'); ?></td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=approved&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_jobs']['approved']['month']; ?>
							</a>							
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=nonapproved&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_jobs']['nonapproved']['month']; ?>
							</a>
						</td>	
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=waiting&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_jobs']['waiting']['month']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=expired&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_jobs']['expired']['month']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_jobs']['expired']['month'] + $statistics['ja_jobs']['approved']['month']+$statistics['ja_jobs']['nonapproved']['month']+$statistics['ja_jobs']['waiting']['month']; ?>
							</a>
						</td>
					</tr>
					<tr class="row1">
						<td><?php echo JText::_('Total'); ?></td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=approved"; ?>' >
								<?php echo $statistics['ja_jobs']['approved']['all']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=nonapproved"; ?>' >
								<?php echo $statistics['ja_jobs']['nonapproved']['all']; ?>
							</a>
						</td>	
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=waiting"; ?>' >
								<?php echo $statistics['ja_jobs']['waiting']['all']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jajobs&filter_status=expired"; ?>' >
								<?php echo $statistics['ja_jobs']['expired']['all']; ?>
							</a>
						</td>
						<td align="center">
							<?php echo $statistics['ja_jobs']['expired']['all'] + $statistics['ja_jobs']['approved']['all']+$statistics['ja_jobs']['nonapproved']['all']+$statistics['ja_jobs']['waiting']['all']; ?>
						</td>
					</tr>						
				</table>					
			</fieldset>
		</div>
		<!-- //POSTED JOBS -->
		
		<!-- TRANSACTION -->
		<div class="ja-transactions">
			<fieldset>
				<legend><?php echo JText::_('Transactions');?></legend>
  				<table class="adminlist">
			    	<thead>
			    		<tr>
							<th class="sectiontableheader" width="20%"><?php echo JText::_(' '); ?></th>
			    			<th class="sectiontableheader"><?php echo JText::_('Amount ($)'); ?></th>
			    		</tr>
			    	</thead>
					<tr class="row0">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('Today'); ?>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jatransactions&filter_completed=1&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_transactions']['today']!=null?$statistics['ja_transactions']['today']:0; ?>
							</a>
						</td>
					</tr>
					<tr class="row1">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('This week'); ?>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jatransactions&filter_completed=1&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_transactions']['week']!=null?$statistics['ja_transactions']['week']:0; ?>
							</a>
						</td>
					</tr>
					<tr class="row0">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('This month'); ?>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jatransactions&filter_completed=1&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_transactions']['month']!=null?$statistics['ja_transactions']['month']:0; ?>
							</a>
						</td>
					</tr>
					<tr class="row1">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('Total'); ?>
						</td>
						<td align="center">
							<?php echo $statistics['ja_transactions']['all']!=null?$statistics['ja_transactions']['all']:0; ?>
						</td>
					</tr>						
				</table>					
			</fieldset>
		</div>
		<!-- // TRANSACTION-->
		
	</div>
	
	<div class="clearfix">
		<div class="ja-new-employers">
			<fieldset>
				<legend><?php echo JText::_('New employers');?></legend>
				<table   class="adminlist">
					<thead>
						<tr>
							<th class="sectiontableheader" width="20%"><?php echo JText::_(' '); ?></th>
							<th class="sectiontableheader"><?php echo JText::_('Approved'); ?></th>
							<th class="sectiontableheader"><?php echo JText::_('Disapproved'); ?></th>
							<th class="sectiontableheader"><?php echo JText::_('Total'); ?></th>
						</tr>
					</thead>
					<tr class="row0">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('Today'); ?>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jaemployers&filter_approved=approved&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_employers']['approved']['today']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jaemployers&filter_approved=nonapproved&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_employers']['unapproved']['today']; ?>
							</a>
						</td>	
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jaemployers&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_employers']['approved']['today'] + $statistics['ja_employers']['unapproved']['today']; ?>
							</a>
						</td>																					
					</tr>
					<tr class="row1">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('This week'); ?>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jaemployers&filter_approved=approved&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_employers']['approved']['week']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jaemployers&filter_approved=nonapproved&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_employers']['unapproved']['week']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jaemployers&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_employers']['unapproved']['week'] + $statistics['ja_employers']['approved']['week']; ?>
							</a>
						</td>
					</tr>
					<tr class="row0">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('This month'); ?>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jaemployers&filter_approved=approved&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_employers']['approved']['month']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jaemployers&filter_approved=nonapproved&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_employers']['unapproved']['month']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jaemployers&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_employers']['approved']['month'] + $statistics['ja_employers']['unapproved']['month']; ?>
							</a>
						</td>
					</tr>
					<tr class="row0">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('Total'); ?>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jaemployers&filter_approved=approved"; ?>' >
								<?php echo $statistics['ja_employers']['approved']['all']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jaemployers&filter_approved=nonapproved"; ?>' >
								<?php echo $statistics['ja_employers']['unapproved']['all']; ?>
							</a>
						</td>
						<td align="center">
							<?php echo $statistics['ja_employers']['approved']['all'] + $statistics['ja_employers']['unapproved']['all']; ?>
						</td>
					</tr>
						
				</table>
			</fieldset> 
		</div>
		
		<div class="ja-new-resumes">
			<fieldset>
				<legend><?php echo JText::_('New resumes');?></legend>
				<table   class="adminlist">
					<thead>
						<tr>
							<th class="sectiontableheader" width="20%">
								<?php echo JText::_(' '); ?>
							</th>
							<th class="sectiontableheader">
								<?php echo JText::_('Approved'); ?>
							</th>
							<th class="sectiontableheader">
								<?php echo JText::_('Disapproved'); ?>
							</th>
							<th class="sectiontableheader">
								<?php echo JText::_('Total'); ?>
							</th>
						</tr>
					</thead>
					<tr class="row0">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('Today'); ?>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jacandidates&filter_approved=approved&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_resumes']['approved']['today']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jacandidates&filter_approved=nonapproved&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_resumes']['unapproved']['today']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jacandidates&filter_duration=today"; ?>' >
								<?php echo $statistics['ja_resumes']['approved']['today'] + $statistics['ja_resumes']['unapproved']['today']; ?>
							</a>
						</td>
					</tr>
					<tr class="row1">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('This week'); ?>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jacandidates&filter_approved=approved&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_resumes']['approved']['week']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jacandidates&filter_approved=nonapproved&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_resumes']['unapproved']['week']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jacandidates&filter_duration=week"; ?>' >
								<?php echo $statistics['ja_resumes']['approved']['week'] + $statistics['ja_resumes']['unapproved']['week']; ?>
							</a>
						</td>
					</tr>
					<tr class="row0">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('This month'); ?>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jacandidates&filter_approved=approved&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_resumes']['approved']['month']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jacandidates&filter_approved=nonapproved&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_resumes']['unapproved']['month']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jacandidates&filter_duration=month"; ?>' >
								<?php echo $statistics['ja_resumes']['approved']['month'] + $statistics['ja_resumes']['unapproved']['month']; ?>
							</a>
						</td>
					</tr>
					<tr class="row0">
						<td style="font-weight:bold;" width="20%">
							<?php echo JText::_('Total'); ?>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jacandidates&filter_approved=approved"; ?>' >
								<?php echo $statistics['ja_resumes']['approved']['all']; ?>
							</a>
						</td>
						<td align="center">
							<a href='<?php echo "index.php?option=".$option."&view=jacandidates&filter_approved=nonapproved"; ?>' >
								<?php echo $statistics['ja_resumes']['unapproved']['all']; ?>
							</a>
						</td>
						<td align="center">
							<?php echo $statistics['ja_resumes']['approved']['all'] + $statistics['ja_resumes']['unapproved']['all']; ?>
						</td>
					</tr>
				</table>								
			</fieldset>
		</div>
	</div>
	
								
	<input type="hidden" name="option" value="<?php echo $option; ?>" />
</form>
